import React from 'react'

import {withRouter} from 'react-router-dom'
import Icon from '../Icon'

import './index.css'

export default withRouter( props => (

    <div className="header" onClick={()=>{
        
        if(props.path) return props.history.push(props.path)
            
        props.history.goBack()

    }}>
        <Icon iconName="go" />
        <span>{props.title}</span>
    </div>

))


